package com.sc.teacher.controller;

import com.sc.teacher.service.VideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Auther: 段力博
 * @Date: 2020/9/24 22:27
 * @Description:
 */
@RestController
public class VideoController {

    @Autowired
    private VideoService videoService;

    //上传视频至阿里云

    @PostMapping("uploadVideo")
    public String uploadVideo(MultipartFile file){
        String videoId = videoService.uploadVideoAly(file);
        return videoId;
    }

}
